<?php include_once './application/views/sys_admin/common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once './application/views/sys_admin/common/shop_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>商城管理</strong> &gt;&gt;  商品详情
		</div>
		
		<div class="admin_right_info">
			<iframe name="iframe" id="iframe" style="display:none;"></iframe>
			<form action="/sys_admin/shop/toset" enctype="multipart/form-data" method="post" target="iframe">
			
			<input type="hidden" name="id" value="<?php echo isset($info['id']) ? $info['id']: '';?>"/>
			<ul>
			<li>商品名称：<input type="text" name="pname" value="<?php echo isset($info['pname']) ? $info['pname']: '';?>" /></li>
			<li>商品类型：
				<select name="ptype">
					<?php foreach ($vars['types'] as $k => $v){?>
					<option value="<?php echo $k;?>" <?php if (isset($info['ptype']) && $info['ptype']==$k) echo "selected='selected'";?>><?php echo $v;?></option>
					<?php }?>
				</select> 
			</li>
			<li>商品图片：
				<input type="file" class="input_border" size="20" name="pimg" /><br />
				<?php if (isset($info['pimg']) && $info['pimg']){?>
				<img src="<?php echo $info['pimg'];?>" alt="" style="width:90px;height:90px;"/>
				<?php }?>
			</li>
			<li>是否只允许VIP兑换：
				<input type="radio" name="pvip" value="0" <?php if(!isset($info['pvip']) || $info['pvip']==0) echo "checked='checked'"; ?>/>否  
				<input type="radio" name="pvip" value="1" <?php if(isset($info['pvip']) && $info['pvip']==1) echo "checked='checked'"; ?>/>是
			</li>
			<li>市场价格：<input type="text" name="pmoney" value="<?php echo isset($info['pmoney']) ? $info['pmoney']: '';?>" /> </li>
			<li>积分价格：<input type="text" name="pcredit" value="<?php echo isset($info['pcredit']) ? $info['pcredit']: '';?>" /> </li>
			<li>VIP价格：<input type="text" name="pvipcredit" value="<?php echo isset($info['pvipcredit']) ? $info['pvipcredit']: '';?>" /> </li>
			<li>商品状态：
				<input type="radio" name="pstatus" value="0" <?php if(!isset($info['pstatus']) || $info['pstatus']==0) echo "checked='checked'"; ?>/>下架  
				<input type="radio" name="pstatus" value="1" <?php if(isset($info['pstatus']) && $info['pstatus']==1) echo "checked='checked'"; ?>/>上架
			</li>
			<!--  <li>是否推荐：
				<input type="radio" name="ptui" value="0" <?php if(!isset($info['ptui']) || $info['ptui']==0) echo "checked='checked'"; ?>/>否  
				<input type="radio" name="ptui" value="1" <?php if(isset($info['ptui']) && $info['ptui']==1) echo "checked='checked'"; ?>/>是
			</li>
			<li>是否参团：
				<input type="radio" name="ptuan" value="0" <?php if(!isset($info['ptuan']) || $info['ptuan']==0) echo "checked='checked'"; ?>/>否  
				<input type="radio" name="ptuan" value="1" <?php if(isset($info['ptuan']) && $info['ptuan']==1) echo "checked='checked'"; ?>/>是
			</li>-->
			<li>折扣率：<input type="text" name="prate" style="width:50px;" value="<?php echo isset($info['prate']) ? $info['prate']: 1;?>"/>[0.8为8折;1为无折扣] </li>
			<li>是否热门：
				<input type="radio" name="phot" value="0" <?php if(!isset($info['phot']) || $info['phot']==0) echo "checked='checked'"; ?>/>否  
				<input type="radio" name="phot" value="1" <?php if(isset($info['phot']) && $info['phot']==1) echo "checked='checked'"; ?>/>是
			</li>
			<li>已兑换：<input type="text" name="pconvert" style="width:50px;" value="<?php echo isset($info['pconvert']) ? $info['pconvert']: 0;?>"/>件 </li>
			<!-- <li>秒杀抢购：
				<input type="radio" name="prob" value="0" <?php if(!isset($info['prob']) || $info['prob']==0) echo "checked='checked'"; ?>/>否  
				<input type="radio" name="prob" value="1" <?php if(isset($info['prob']) && $info['prob']==1) echo "checked='checked'"; ?>/>是
			</li>
			<li>开抢时间：<input type="text" name="probstart" style="width:150px;" value="<?php echo isset($info['probstart']) && $info['probstart'] ? date('Y-m-d H:i:s',$info['probstart']): '';?>" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/> </li>-->
			<li>剩余数：<input type="text" name="psurp" style="width:50px;" value="<?php echo isset($info['psurp']) ? $info['psurp']: 0;?>"/>件 </li>
			<li>详情描述：
				<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.config.js"></script>
    			<script type="text/javascript" charset="utf-8" src="/static/ueditor/ueditor.all.js"></script>
    			<script type="text/javascript" charset="utf-8">
			          var editor = new baidu.editor.ui.Editor();
			          editor.render('pdesc');  //editor为编辑器容器的id
			      </script>
				<textarea name="pdesc" id="pdesc" style="width:800px">
				<?php echo isset($info['pdesc']) ? $info['pdesc']:'';?>
				</textarea>
			</li>
			
			<li><input type="submit" value="确认<?php echo isset($info['id']) ? '修改':'添加';?>" /></li>
			
			
			</ul>
			</form>

		</div>
			
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
</body>
</html>
